import React, { useState } from 'react'
import { View, Text, Input, Image, Textarea } from '@tarojs/components'
import PageWrapper from '@/components/PageWrapper'
import './index.scss';
const Type = ({ data }: { data: any[] }) => {
  return (
    <View className="community-type-box">
      {data.map((item,index)  => (
        <View key={index} className={item.checked !== 1 ? 'community-type-item' : 'community-type-item-checked'}>
          <View className="community-type-title">{item.name}</View>
        </View>
      ))}
    </View>
  );
};

const Page = () => {
// 分类
  const typeList = [
    { name: '线上鉴定', index: 0 ,checked: 1},
    { name: '实物鉴定', index: 1 ,checked: 0},
  ];
  return (
    <PageWrapper title="我的鉴定" showBack={true} backgroundColor='#F0F0F0'>
      <View className="my-appraisal-page">
        <Type data={typeList}></Type>
        <View className="appraisal-box">
          <View className="appraisal-item">
            <View className="goods-img">
              <Image src={require(`../../../assets/photo.png`)}/>
            </View>
            <View className="goods-box">
              <View className="goods-name">贵州茅台 2024年</View>
              <View className="goods-dsc">西班牙等各国酒关产1111111111111111111111111品，品种系列 化、多样化</View>
              <View className="goods-time">2025-1-24 12:07 北京</View>
            </View>
            <View className="goods-state">
              {/*<Image src={require(`../../../assets/real.png`)}/>*/}
              <Image src={require(`../../../assets/fake.png`)}/>
              <View  className="state">鉴定为假</View>
            </View>
          </View>
          <View className="appraisal-item">
            <View className="goods-img">
              <Image src={require(`../../../assets/photo.png`)}/>
            </View>
            <View className="goods-box">
              <View className="goods-name">贵州茅台 2024年</View>
              <View className="goods-dsc">西班牙等各国酒关产品，品种系列 化、多样化</View>
              <View className="goods-time">2025-1-24 12:07 北京</View>
            </View>
            <View className="goods-state">
              <Image src={require(`../../../assets/real.png`)}/>
              {/*<Image src={require(`../../../assets/fake.png`)}/>*/}
              <View  className="state">鉴定为真</View>
            </View>
          </View>
        </View>
      </View>
    </PageWrapper>
  )
}

export default Page
